﻿<UserControl x:Class="GBlason.Control.MenuControl.RecentDocumentMenu"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Properties="clr-namespace:GBlason.Properties"
             xmlns:CustomCommand="clr-namespace:GBlason.Common.CustomCommand" mc:Ignorable="d"
             Background="#88FFFFFF"
             d:DesignHeight="300" d:DesignWidth="500"
             DataContext="{Binding}">
    <UserControl.Resources>
        <ResourceDictionary Source="..\..\Dictionary\RibbonTemplateDictionary.xaml"/>
    </UserControl.Resources>
    <UserControl.CommandBindings>
        <CommandBinding Command="{x:Static CustomCommand:CommandMenu.RecentObjectFlag}" Executed="FlagRecentItemExecuted"/>
    </UserControl.CommandBindings>
    <Grid x:Name="OverallGrid">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="9px"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <!-- Liste de documents -->
        <Grid x:Name="RecentDocumentMainGrid" Grid.Column="0" VerticalAlignment="Stretch">
            <Grid.RowDefinitions>
                <RowDefinition Height="36px"/>
                <RowDefinition Height="4px" />
                <RowDefinition Height="Auto" MinHeight="0"/>
                <RowDefinition Height="Auto" MinHeight="0" MaxHeight="4px"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" FontSize="16" Foreground="#DD000000" Text="{x:Static Properties:Resources.RecentDocumentMenuRecentFileTitle}"
                       VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5"/>
            <Rectangle Grid.Row="1" StrokeThickness="0,0,0,1" StrokeDashArray="2 5" Height="1"
                       HorizontalAlignment="Stretch" Stroke="DarkGray" VerticalAlignment="Center" Margin="5,0">
            </Rectangle>
            <ListView x:Name="RecentDocumentFlaggedListView" Grid.Row="2" ItemsSource="{Binding Path=RecentFilesFlaggedOrderedByDate}" Margin="10,5"
                      Background="#00FFFFFF" BorderThickness="0" ItemTemplate="{StaticResource ResourceKey=RecentFileDataTemplate}"
                       HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
                      Visibility="{Binding Path=FlaggedFilesVisibility}">

            </ListView>
            <Rectangle Grid.Row="3" StrokeThickness="0,0,0,1" StrokeDashArray="2 5" Height="1"
                       HorizontalAlignment="Stretch" Stroke="DarkGray" VerticalAlignment="Center" Margin="5,0"
                       Visibility="{Binding Path=FlaggedFilesVisibility}">
            </Rectangle>
            <ListView x:Name="RecentDocumentListView" Grid.Row="4" ItemsSource="{Binding Path=RecentFilesOrderedByDate}" Margin="10,5"
                      Background="#00FFFFFF" BorderThickness="0" ItemTemplate="{StaticResource ResourceKey=RecentFileDataTemplate}"
                       HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch">

            </ListView>
        </Grid>
        <!-- Les emplacements -->
        <Grid x:Name="RecentLocationMainGrid" Grid.Column="2" VerticalAlignment="Stretch">
            <Grid.RowDefinitions>
                <RowDefinition Height="36px"/>
                <RowDefinition Height="4px" />
                <RowDefinition Height="Auto" MinHeight="0"/>
                <RowDefinition Height="Auto" MinHeight="0" MaxHeight="4px"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" FontSize="16" Foreground="#DD000000" Text="{x:Static Properties:Resources.RecentDocumentMenuRecentLocationTitle}"
                       VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5"/>
            <Rectangle Grid.Row="1" StrokeThickness="0,0,0,1" StrokeDashArray="2 5" Height="1"
                       HorizontalAlignment="Stretch" Stroke="DarkGray" VerticalAlignment="Center" Margin="5,0">
            </Rectangle>
            <ListView x:Name="RecentDirectoriesFlaggedListView" Grid.Row="2" ItemsSource="{Binding Path=RecentDirectoriesFlaggedOrderedByDate}" Margin="10,5"
                      Background="#00FFFFFF" BorderThickness="0" ItemTemplate="{StaticResource ResourceKey=RecentDirectoryDataTemplate}"
                       HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
                      Visibility="{Binding Path=FlaggedDirectoriesVisibility}">

            </ListView>
            <Rectangle Grid.Row="3" StrokeThickness="0,0,0,1" StrokeDashArray="2 5" Height="1"
                       HorizontalAlignment="Stretch" Stroke="DarkGray" VerticalAlignment="Center" Margin="5,0"
                       Visibility="{Binding Path=FlaggedDirectoriesVisibility}">
            </Rectangle>
            <ListView x:Name="RecentDirectoriesListView" Grid.Row="4" ItemsSource="{Binding Path=RecentDirectoriesOrderedByDate}" Margin="10,5"
                      Background="#00FFFFFF" BorderThickness="0" ItemTemplate="{StaticResource ResourceKey=RecentDirectoryDataTemplate}"
                       HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch">

            </ListView>
        </Grid>
        <!-- La ligne du milieu -->
        <Border Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Center" Margin="1,5" BorderThickness="1" Width="1">
            <Border.BorderBrush>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Color="#11000000" Offset="0.0" />
                    <GradientStop Color="#88000000" Offset="0.25" />
                    <GradientStop Color="#88000000" Offset="0.75" />
                    <GradientStop Color="#11000000" Offset="1" />
                </LinearGradientBrush>
            </Border.BorderBrush>
        </Border>
    </Grid>
</UserControl>
